import Flutter


public class SwiftIvyEzvizPlugin: NSObject, FlutterPlugin {
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(name: "ivy_ezviz_plugin", binaryMessenger: registrar.messenger())
    let instance = SwiftIvyEzvizPlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
    
    //注册页面
    registrar.register(EzvizUIKitViewFactory(registrar:registrar), withId: "com.ivy.ezvizUIKit.view")
    
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    
    if(call.method == "getPlatformVersion"){
        result("iOS " + UIDevice.current.systemVersion)

    }else{
        result(FlutterMethodNotImplemented)
    }
  }
    
}
